<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/Static/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="/Static/Css/zh-cn-system.css" />
<link rel="stylesheet" type="text/css" href="/Static/Css/table_form.css" />
<script src="/Public/js/jquery.min.js"></script>
<script src="/Public/js/jquery.form.js"></script>
<script src="/Public/js/main.js"></script>
<script type="text/javascript" src="/Public/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/Public/artDialog/plugins/iframeTools.js"></script>
</head>
<body>

<div class="subnav">
  <div class="explain-col" style="position: relative;">
  <a href="#messagePlace">点击跳至留言</a>
  </div>
</div>
<!--subnav-->
<div class="pad-lr-10">
  <div class="table-list">
    <table width="100%" cellspacing="0">
      <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><thead>
          <tr>
            <th width="50" align="left"><?php echo ($vo['id']); ?>楼</th>
            <th align="left" ><?php echo ($vo['username']); ?></th>
            <th align="center"></th>
          </tr>
        </thead>
        <tbody  id="list">
            <tr id="list-<?php echo ($vo["id"]); ?>">
              <td align="left" colspan="3"><?php echo ($vo["content"]); ?></td>
            </tr>
        </tbody><?php endforeach; endif; else: echo "" ;endif; ?>
    </table>
  </div>
  <div class="btn">
    <div id="pages" style="float:left;"><?php echo ($page); ?></div>
    <!--<input name="submit" type="button" class="button" value="导出联系人信息"  onclick="return exportExcel();">-->
  </div>
</div>

<form name="addform" id="addform" method="POST" action="/index.php/messages/add">
  <fieldset>
    <legend id="messagePlace">留言</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr class="last">
          <th>内容：</th>
          <td><textarea name="content" id="editor" style="height: 80px; width: 650px;"></textarea></td>
        </tr>
        <tr>
          <th width="100"></th>
          <td>
            <INPUT class=button value=提交 type=submit name=dosubmit>
          </td>
        </tr>
        <TH>&nbsp;</TH>
      </tbody>
    </table>
  </fieldset>
  <input type="submit" value="提交" class="dialog" id="dosubmit">
</form>
</body>
</html>
<script type="text/javascript" src="/Public/ueditor/ueditor.config.js"></script> <!--ueditor编辑器-->
<script type="text/javascript" src="/Public/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function(){
  $('#addform').ajaxForm({
    beforeSubmit:  checkForm,
    success:       complete,
    dataType: 'json'
  });
  function checkForm(){
      return true;
  }
  function complete(data){
    msg(data.info,data.status);
    if(data.status==1){
      setTimeout(function(){location.reload();},1000);
    }
  }

})
</script>

<script type="text/javascript">
    //实例化编辑器
    UE.getEditor('editor',{
        //清空了工具栏
        toolbars:[['fullscreen',  'source', '|', 'emotion','undo', 'redo', '|',
            'bold', 'italic', 'underline',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
            'link', 'unlink',  '|',
            'help', 'drafts']]
    })
</script>